" 测试list和dict的添加、修改、删除功能

" 测试list操作
let my_list = [1, 2, 3]
echo "初始list: " . string(my_list)

" 添加元素
let my_list = add(my_list, 4)
echo "添加元素后: " . string(my_list)

" 修改元素
let my_list[1] = 20
echo "修改元素后: " . string(my_list)

" 删除元素
let my_list = remove(my_list, 1)
echo "删除元素后: " . string(my_list)

" 测试dict操作
let my_dict = {'name': 'viml', 'version': 1.0}
echo "初始dict: " . string(my_dict)

" 添加键值对
let my_dict['author'] = 'team'
echo "添加键值对后: " . string(my_dict)

" 修改键值对
let my_dict['version'] = 1.1
echo "修改键值对后: " . string(my_dict)

" 删除键值对
unlet my_dict['author']
echo "删除键值对后: " . string(my_dict)

echo "list和dict测试完成"